home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / DRI-archive / manuals / ibm_ sys32_ drive.txt < prev    next >
Text File  |  2007-01-24  |  40KB  |  1,052 lines

  1. IBM32DSK.WS4
  2. ------------
  3.  
  4. - Chapter 8 of the "IBM System/32 Functions Reference Manual"
  5.   IBM Document GA21-9176-1
  6.   Second Edition: May 1975
  7.  
  8. (Retyped by Emmanuel ROCHE. Posted to comp.os.cpm.amethyst by
  9. Roche 07 May 2005.)
  10.  
  11.  
  12. Chapter 8. Diskette drive functions
  13. -----------------------------------
  14.  
  15. The  IBM System/32 diskette drive has a single head for reading  and
  16. writing.
  17. The diskette supports two primary system functions:
  18.  
  19.       - Data   interchange,   using  the  IBM  diskette  for   standard
  20. data
  21.         interchange.
  22.  
  23.       - Storing data from the disk to save it for future use, then loading
  24. it
  25.         back into the system at a later time when needed for a job.
  26.  
  27.  
  28. Physical characteristics
  29. ========================
  30.  
  31. Only  one side of the diskette is used. The diskette surface is  divided into
  32. tracks.  Each  diskette surface contains 77 tracks; track 00  is  the outside
  33. track and track 76 is the inside track.
  34.  
  35. Figure  8-1. Standard interchange diskette surface recording arrangement
  36. (not "retyped")
  37.  
  38. Of  the  77 tracks, only 75 are normally used. Track 00  contains  the volume
  39. label; tracks 1-74 are primary tracks used to contain data records. Tracks 75
  40. and  76  are available for data storage in the event that one or  two  of the
  41. primary data tracks become defective.
  42.  
  43. For  standard data interchange, each track is divided into 26 sectors (Figure
  44. 8-1). Each sector is 128 bytes long, so it is possible to store 242,944 bytes
  45. of information on tracks 1-73. Data can be stored on track 74 of a diskette in
  46. the  standard  data interchange format, allowing for the  storage  of 246,272
  47. bytes of data on the diskette, if the data on track 74 is to be read only by
  48. a System/32.
  49.  
  50. On diskettes in the extended format, track 00 is divided into 26 sectors, but
  51. each  remaining  track  is  divided into eight  512-byte  sectors,  making it
  52. possible to store 303,104 bytes of information on tracks 1-74.
  53.  
  54. The  data  stored in each sector is called a record.  Therefore,  because the
  55. diskette is formatted into tracks and sectors, each record on the diskette has
  56. a  definite  address  consisting of a track number  and  sector  number. This
  57. address  is  recorded  at  the record's physical  location  on  the diskette.
  58. Diskettes  that contain prerecorded record addresses are known as initialized
  59. diskettes; each record consists of an ID field and a data field.
  60.  
  61. Rotational  speed of the diskette drive is 360 +/- 2.5% RPM. The nominal data
  62. transfer  rate of the diskette drive is 31,250 bytes per second. The diskette
  63. drive reads 128-byte records from a diskette and writes 128-byte records to
  64. a diskette at the following rates:
  65.  
  66.         Using diskettes in the          Using diskettes in the
  67.         Standard interchange format     Extended format
  68.  
  69. Reads   Up to 3,400 records per minute  Up to 4,100 records per minute
  70.  
  71. Writes  Up to 1,800 records per minute  Up to 2,200 records per minute
  72.  
  73.  
  74. Record format
  75. =============
  76.  
  77. +------+------+-----+----+-----+------+------+-----+-----++-----+------+
  78. |      |      |     |    |     |      |      | AM2 | DATA \ ... |     |
  79. |
  80. | GAP1 | SYNC | AM1 | ID | CRC | GAP2 | SYNC |  or |  or   \    | CRC | GAP1
  81. |
  82. |      |      |     |    |     |      |      | AM3 | CONTROL\   |     |
  83. |
  84. +------+------+-----+----+-----+------+------+-----+---------++-----+------+
  85.  
  86. Format: Field
  87.         Description
  88.  
  89. GAP1
  90. The gap between the data field and the next record. It is variable length and
  91. contains all 1's.
  92.  
  93. SYNC
  94. A  6-byte  field  of 0's which synchronizes the  hardware  circuits  prior to
  95. reading the information from the diskette.
  96.  
  97. AM1
  98. A  single-byte identifier field address mark which identifies the ID data and
  99. contains hex FE.
  100.  
  101. ID
  102. A 4-byte associate sector address in the format CHRN, where:
  103.  
  104.     C = Cylinder address.
  105.         Valid one-byte binary addresses are:
  106.  
  107.                 Decimal = 00-76
  108.                 Hex     = 00-4C
  109.  
  110.     H = One-byte binary head address.
  111.         The valid address is X'00'.
  112.  
  113.     R = One-byte binary record address.
  114.         Valid addresses are:
  115.  
  116.                         Standard interchange format     Extended format
  117.                 Decimal         01-26                   01-08
  118.                 Hex             X'01'-X'1A'             X'01'-X'08'
  119.  
  120.     N = One-byte record length indicator used in the record length algorithm:
  121.         128 x 2 to the power of N.
  122.         N  is  hex 00 for standard 128-byte records, or hex  02  for 512-byte
  123.         records.
  124.  
  125. CRC
  126. A  2-byte cyclic redundancy check field which verifies that the ID  field and
  127. data  field  were read correctly. The system generates these  bytes  during a
  128. write  operation and automatically performs a read-back check  to verifytheir
  129. accuracy.
  130.  
  131. GAP2
  132. Interrecord  gap between the ID field and the data field. It contains  hex FF
  133. and is generated by the system during write operations.
  134.  
  135. AM2 or AM3
  136. A 1-byte field containing either X'FB' or X'F8'. X'FB' is a data field address
  137. marker (AM2) that identifies subsequent information as a data field. X'F8' is
  138. a  control field address marker (AM3) that indicates that the following field
  139. contains control data.
  140.  
  141. DATA or CONTROL
  142. The  length  of  this field is specified by the record  length  indicator (N)
  143. contained  in  the ID field. The System/32 record length of  128  bytes (N=0)
  144. conforms  to  the  specifications  of  the  IBM  diskette  for  standard data
  145. interchange.
  146.  
  147.  
  148. Figure 8-2. Diskette IOB format
  149. -------------------------------
  150.  
  151. Format: Displacement of leftmost byte in hex
  152.         IBM program label
  153.         Length in bytes
  154.         Field description
  155.  
  156. 0
  157. IIOBCAN
  158. 2
  159. This is the sector address of the last sector accessed.
  160.  
  161. 2
  162. IIOBCMP
  163. 1
  164. This is the diskette completion code (in hex).
  165.    40 = Successful completion.
  166.    41 = Permanent I/O error.
  167.    42 = End of volume.
  168.    43 = Drawer is opened, but diskette has same volume-ID.
  169.    45 = Bad sector not fixed by user.
  170.    47 = Stand-alone  version of |1IOS or drawer is opened but volume label is
  171.         invalid or volume ID not the same.
  172.    49 = Unsupported control record.
  173.  
  174. 3
  175. IIOBQB
  176. 1
  177. This is the Q-byte (in hex).
  178.    D0 = Seek.
  179.    D1 = Read data.
  180.    D2 = Read ID.
  181.    D4 = Read data/CAM.
  182.         (D and F control records are not squeezed out as in |1PRD.)
  183.    D5 = Write data.
  184.    D6 = Write control address marks.
  185.    D7 = Write ID.
  186.  
  187. 4
  188. IIOBRB
  189. 1
  190. This is the R-byte (in hex).
  191.    80 = Seek after.
  192.    00 = Null.
  193.  
  194. 5
  195. IIOBSS
  196. 2
  197. This is the sector address.
  198.  
  199. 7
  200. IIOBNB
  201. 1
  202. This is the number of sectors, minus 1, involved in data transfer.
  203.  
  204. 8
  205. IIOBDAT
  206. 2
  207. This is the data buffer address.
  208.  
  209. A
  210. IIOBSNS1
  211. 2
  212. Sense bytes 0 and 1.
  213.  
  214.  Byte 0 (in hex).
  215.    80 = Missing data address mark (two consecutive AMs found).
  216.    40 = CRC found in ID field.
  217.    20 = CRC found in data field.
  218.    10 = Cylinder byte in ID miscompare.
  219.    08 = Head byte in ID miscompare.
  220.    04 = Record byte in ID miscompare.
  221.    02 = Length byte in ID miscompare.
  222.    01 = First ID is found (no error).
  223.  
  224.  Byte 1 (in hex).
  225.    80 = Due to prior condition, no action attempted.
  226.    40 = Invalid control record found (not D or F).
  227.    20 = Lines to |1 were not set/read correctly.
  228.    10 = Control record(s) squeezed out.
  229.    08 = Physical cylinder number greater than 76.
  230.    04 = Reserved.
  231.    02 = Reserved.
  232.    01 = Reserved.
  233.  
  234. C
  235. IIOBSNS2
  236. 2
  237. Sense bytes 2 and 3.
  238.  
  239.  Byte 2 (in hex).
  240.    80 = |1 index pulses too close together.
  241.    40 = |1 index pulses too far apart.
  242.    20 = End-of-cylinder found (not tested).
  243.    10 = No IDs on track.
  244.    08 = Read overrun.
  245.  
  246.    02 = Write overrun.
  247.    01 = Write parity check.
  248.  
  249.  Byte 3 (in hex).
  250.    80 = Head loaded.
  251.    40 = Low gate current set.
  252.    20 = Write gate on.
  253.    10 = Erase gate on.
  254.    08 = Seek to track 3 or 0 on.
  255.    04 = Seek to track 0 or 1 on.
  256.    02 = Seek to track 1 or 2 on.
  257.    01 = Seek to track 2 or 3 on.
  258.  
  259. E
  260. IIOBERR
  261. 1
  262. This is the error retry count.
  263.  
  264. F
  265. IIOBFLG
  266. 1
  267. This is the flag byte.
  268.         Bit On  Meaning
  269.         ------  -------
  270.            0    No ERPs attempted.
  271.            1    Automatic error display and correction allowed.
  272.            2    No error logging.
  273.            3    Allow seek past logical cylinder 74 (to 75 or 76).
  274.            4    Do not return to user program if ERP completion
  275.                 code is |1COMPER, |1NOTFIX, or |1INVCAM.
  276.  
  277. 10
  278. Reserved
  279. 1
  280. Reserved.
  281.  
  282. 11
  283. IIOBEXP
  284. 1
  285. This is the sector size.
  286.  
  287. 12
  288. IIOBXR2
  289. 2
  290. This is a save area for XR2.
  291.  
  292. 14
  293. IIOBARR
  294. 2
  295. This is a save area for the ARR.
  296.  
  297. 16
  298. IIOBDTF
  299. 2
  300. This is the DTF address.
  301.  
  302.  
  303. Diskette drive operating characteristics
  304. ========================================
  305.  
  306. The  program  must  build  a diskette IOB (Figure  8-2)  to  control diskette
  307. operations. Diskettes perform most efficiently if programs use sequential data
  308. organization,  which  is  normally used for data  interchange  and  data file
  309. save/restore  functions. The system performs seek, read, and write  which are
  310. typical  direct  access storage device functions. Diskette  input  and output
  311. operations cannot be overlapped with any other system function.
  312.  
  313.  
  314. Diskette control fields and data fields
  315. ---------------------------------------
  316.  
  317. Before  issuing a seek, read, or write instruction, the program  usually must
  318. initialize  the diskette control fields and data fields. These  fields, which
  319. can be located anywhere in main storage, are addressed by the control address
  320. register (CAR) and data address register (DAR), respectively.
  321.  
  322.  
  323. Control field
  324.  
  325. The 5-byte control field (CHRNX) is used to specify:
  326.  
  327.       - For a seek operation, the destination track address (00-76 or hex FF);
  328.         the  cylinder address of hex FF specifies a recalibrate operation. H,
  329.         R, N, and X are not used for a seek operation.
  330.  
  331.       - For  a  seek,  read-data-and-control-record,  write-data,  or write-
  332.         control-address-mark operation:
  333.               C is the destination cylinder for the automatic seek.
  334.               R is the starting record number.
  335.               N is the number of bytes per record (128 x 2 to the power of N).
  336.             X+1 is the number of records to be accessed.
  337.  
  338. Before processing any data field, the system compares the CHRN portion of the
  339. control  field  and the corresponding portion of the identifier field  of the
  340. record  read.  This process is called orientation. If  orientation  cannot be
  341. done, the system turns on the no-orient status bit (status byte 2, bit 3).
  342.  
  343. As  instruction execution proceeds, the system modifies the R- and X-bytes of
  344. the control field after each record is successfully processed; this maintains
  345. a log of instruction execution for error recovery procedures.
  346.  
  347. The  program must load the address of the leftmost byte of the  control field
  348. into the control address register prior to instruction execution.
  349.  
  350. The control field (CHRNX) has the following meaning:
  351.  
  352.       - C (cylinder number) is a 1-byte address; valid decimal addresses are 0
  353.         through 76. Cylinder addresses 77-254 set the invalid cylinder address
  354.         (byte 1, bit 4); cylinder address 255 specifies recalibrate. This byte
  355.         is not changed during execution unless a cylinder boundary is crossed
  356.         during   a   read-data,  write-data,   or write-control address-mark
  357.         operation.
  358.  
  359.         Note: For this device, the term cylinder and track are synonymous.
  360.  
  361.       - H (head number) is a 1-byte address; the only valid decimal address is
  362.         0. This byte remains unchanged during command execution.
  363.  
  364.       - R (record number) is a 1-byte binary address that specifies the first
  365.         record  to  be processed in a single-record  or  multiple-record data
  366.         operation. Decimal record numbers 1 through 26 are valid for standard
  367.         interchange  diskettes,  1 through 8 for  extended  format diskettes;
  368.         invalid record numbers set the record-mismatch status bit (byte 0, bit
  369.         5). The system increments the record number by 1 after each record is
  370.         processed if a not-ready/unit-check condition is not detected.
  371.  
  372.       - N  (record length indicator) is a 1-byte binary number that indicates
  373.         the  physical record length. N must be 0 for 128-byte records,  2 for
  374.         512-byte   records.  This  byte  remains  unchanged   during command
  375.         execution.
  376.  
  377.       - X (number of records) is a 1-byte binary number plus 1 that specifies
  378.         the number of records to be processed; the system decrements this byte
  379.         by  1  after  each  record  is  processed  if  a not-ready/unit-check
  380.         condition  is  not  detected. If the system does not  find  a control
  381.         record during a read-data operation, this byte is not decremented.
  382.  
  383.  
  384. Data field
  385.  
  386. The  system transfers data to the data field during read operations, and from
  387. the  data  field during write operations. The data field is addressed  by the
  388. leftmost  byte  and  can  be located arbitrarily in  main  storage.  Prior to
  389. instruction  execution, the program must load the data field address into the
  390. data  address register. For a read-data, read-data-and-control-record, write-
  391. data, or write-control-address-mark operation, the record length indicator and
  392. the  number  of  records to be processed determine the data  field  length as
  393. follows:
  394.  
  395.         Data field length = (X + 1) 128 X 2 to the power of N
  396.  
  397. where X and N come from the control field CHRNX.
  398.  
  399.  
  400. Control address register
  401. ------------------------
  402.  
  403. This 2-byte field in control storage contains the address of the leftmost byte
  404. of  the  control field. The control address register must  be  initialized by
  405. load-diskette-control-field-address-register instruction, and is not modified
  406. during command execution.
  407.  
  408.  
  409. Data address register
  410. ---------------------
  411.  
  412. This  2-byte  field in control storage contains the address of the  data byte
  413. following the last data field byte accessed. It is initialized to the address
  414. of  the  leftmost  byte of the data field before the data  field  is  used to
  415. execute  an instruction. The data address register changes after a  record is
  416. transferred and no errors are found.
  417.  
  418.  
  419. Diskette operations
  420. ===================
  421.  
  422. Diskette seek
  423. -------------
  424.  
  425. During  a control seek, the access mechanism is moved so that  the read/write
  426. head is at the track address specified in the control field. The R-byte of the
  427. seek  instruction  has  no significance. A recalibration  to  cylinder  00 is
  428. performed  by specifying FF in the cylinder address bytes (CC) of the control
  429. field.
  430.  
  431. The  seek  operation  does  not check for an invalid  address  prior  to seek
  432. verification. Instead, the system detects an invalid address or a seek failure
  433. when it compares the control field and record ID field during the next read or
  434. write operation.
  435.  
  436. A  single-track seek has some unique functional characteristics  that improve
  437. save/restore  performance. A single-track seek command requires a  maximum of
  438. 170.83  ms to execute and considerably decreases the time required  to handle
  439. the following diskette read or write instruction.
  440.  
  441. A seek beyond a single track seek requires a maximum of 106 + 53 ms SD. Where
  442. SD  means  seek  displacement in tracks. Recalibrate  time  is  4.346 seconds
  443. maximum.
  444.  
  445.  
  446. Read data
  447. ---------
  448.  
  449. This  operation  initiates  an automatic seek to  the  logical  track address
  450. specified  in  the  control field and then, beginning  at  the  record number
  451. specified in the control field, reads X+1 records into contiguous positions of
  452. the data field addressed by the data address register. When a flagged track is
  453. encountered,  an automatic seek to the next record is executed. A  maximum of
  454. three automatic seeks are attempted before the operation is terminated.
  455.  
  456. If the end of a cylinder is encountered before X+1 records have been accessed,
  457. an  automatic  seek  to  record  1 of the  next  track  occurs  and execution
  458. continues.
  459.  
  460.  
  461. Read data and control record
  462. ----------------------------
  463.  
  464. This  operation  is very similar to the read-data operation. It initiates an
  465. automatic  seek to the logical track address specified in the  control field,
  466. and  then  reads  X+1  records into contiguous positions  of  the  data field
  467. addressed by the data address register. The system reads the records beginning
  468. at  the record number specified within the control field. Whenever the system
  469. encounters  a  flagged  track, it seeks the next record. The  system  tries a
  470. maximum of three automatic seeks before termination of the operation.
  471.  
  472. If  the  system encounters the end of cylinder before X+1  records  have been
  473. accessed,  it  executes an automatic seek to record 1 of the  next  track and
  474. continues with the operation.
  475.  
  476. There is one difference between this operation and the read-data operation. In
  477. this command, if a control address mark is detected, the system sets control-
  478. address-mark  status (byte 1, bit 3) (this bit cannot be tested by a TIO) and
  479. reads  the  control  record data field into the data  field  in  main storage
  480. regardless  of the control character in the first position of the record data
  481. field.
  482.  
  483. For multiple record operations, the system alters the control field when each
  484. record  is read. The record number (R) is incremented by 1 and the  number of
  485. records  to  be accessed (X) is decremented by 1. If a  cylinder  boundary is
  486. crossed,  the  cylinder number is increased by one and the  record  number is
  487. reset to 1.
  488.  
  489. The record number (R) is incremented by 1 and number of records to be accessed
  490. (X)  is  decremented by 1 as each record is read. If a  cylinder  boundary is
  491. crossed, the cylinder number (C) also increases by 1 and the record number is
  492. reset to 1. The rest of the control field does not change.
  493.  
  494. Note:  If a control address mark (hex F8) is detected and the first character
  495. in the data field is not hex C4 or C6 (alpha D or F), the system posts invalid
  496. control record status (byte 1, bit 1) and control address mark (byte 1, bit 3)
  497. and ends the read operation. If an alphabetic D or F is in the first position
  498. of  the  data  field,  the system ignores that  record  and  reads subsequent
  499. records.
  500.  
  501.  
  502. Read ID (Identifier)
  503. --------------------
  504.  
  505. This  operation  initiates the recovery of a single 4-byte  identifier field,
  506. CHRN, from the current selected track. The system places the first identifier
  507. read  without  error in the data field at the address specified  in  the data
  508. address register. If no ID on the current track can be read successfully, the
  509. system posts the no-orient status (byte 2, bit 3).
  510.  
  511. No automatic seek occurs, and the control field remains unchanged.
  512.  
  513. Note:  If a defect appears in an ID field, your program can delete the entire
  514. track  by writing a defective track identifier in all records on that track.
  515. This  ID is CHRN = hex FFFFFFFF. All track information, including  ID fields,
  516. must be put on the next-higher-numbered track.
  517.  
  518.  
  519. Write/verify data
  520. -----------------
  521.  
  522. This  operation  initiates  an automatic seek to the  logical  track adddress
  523. specified in the control field and writes X+1 records obtained from contiguous
  524. positions  of the data field addressed by the data address  register. Records
  525. are written beginning at the record number specified within the control field.
  526. Whenever  the  system encounters a flagged track, it automatically  seeks the
  527. next  track.  A  maximum of three automatic seeks  are  attempted  before the
  528. operation  is terminated. Each record is 128 or 512 bytes long and is written
  529. in accordance with the record format described in "Diskette control fields and
  530. data  fields"  in  this chapter. At the same time, the system  writes  a data
  531. address mark (hex FB) in the byte immediately preceding the data field in the
  532. record.
  533.  
  534. Data verification automatically occurs during the next diskette revolution.
  535.  
  536. If  the  system encounters the end of cylinder before X+1  records  have been
  537. accessed, an automatic seek to record 1 of the next track occurs and execution
  538. continues.
  539.  
  540. The system increments by 1 and decrements the number of records to be accessed
  541. by 1 as each record is written. If a cylinder boundary is crossed, the system
  542. also increments the cylinder number by 1 and sets the record number to 01. The
  543. system does not change the rest of the control field.
  544.  
  545.  
  546. Write/verify control address mark
  547. ---------------------------------
  548.  
  549. This  operation  is very similar to a write-data operation.  It  initiates an
  550. automatic seek to the logical track address specified in the control field  and
  551. then  writes X+1 records obtained from contiguous positions of the data field
  552. addressed by the data address register. Records are written, beginning at the
  553. record number specified within the control field. The only difference between
  554. this  operation  and the write-data operation is that a control  address mark
  555. (hex  F8) is written in the byte immediately preceding the data field  in the
  556. record. The data field of each record written is 128 or 512 bytes long and is
  557. written  in  accordance  with the record format  reference.  When  the system
  558. encounters  a flagged track, an automatic seek to the next track  occurs. The
  559. system  attempts  a  maximum  of  three  automatic  seeks  before  ending the
  560. operation.
  561.  
  562. Data verification occurs during the next diskette revolution.
  563.  
  564. If the end of a cylinder is encountered before X+1 records have been accessed,
  565. an  automatic  seek  to  record  1 of the  next  track  occurs  and execution
  566. continues.
  567.  
  568. The control field remains unchanged except for the record number and number of
  569. records  to  be accessed during multiple record operations; these  values are
  570. incremented  by  1  and  decremented by 1, respectively,  as  each  record is
  571. written.  If  a cylinder boundary is crossed, the system adds 1  to  both the
  572. cylinder number and sets the record number to 01.
  573.  
  574.  
  575. Write/verify ID (Identifier)
  576. ----------------------------
  577.  
  578. The write-ID/verify operation initiates the writing of a full track of data in
  579. accordance  with the record format described in "Diskette control  fields and
  580. data fields" in this chapter.
  581.  
  582. The  system  forces the record number in the control field to 1  so  that the
  583. first  record written after the index point is record 1. The system generates
  584. subsequent record numbers by incrementing the record number byte by 1 as each
  585. record  is written. Data for each record data field is obtained from the same
  586. 128-byte  or 512-byte data field in main storage. The system writes an entire
  587. 128-byte or 512-byte data field from storage for each disk record written.
  588.  
  589. Data verification automatically occurs during the next diskette revolution.
  590.  
  591. The  record number is the only byte in the control field that changes;  it is
  592. decimal 26 or 8 at the end of the operation.
  593.  
  594. Note: Write ID is intended to be used for track initialization procedures. If
  595. the  cylinder  portion of the CHRN field is specified as hex  FF,  the record
  596. number  portion  is not incremented during write-ID execution. This  writes a
  597. defective track identifier field equal to hex FFFFFFFF. During automatic data
  598. verification,  length-mismatch and no-orient status are set.  ID verification
  599. should be performed by the read-ID instruction.
  600.  
  601.  
  602. Check condition and status information
  603. ======================================
  604.  
  605. Refer to Figure 8-3 for a summary of diskette operations, diskette indicators
  606. set, and suggested restart procedures.
  607.  
  608. Format: Bit
  609.         Description
  610.  
  611.  
  612. Status byte 0
  613. -------------
  614.  
  615. 0
  616. "Missing  data  address  mark" indicates that a data  address  marker  is not
  617. detected  after  an  ID field. The next diskette  operation  or  system reset
  618. operation resets this bit.
  619.  
  620. 1
  621. "ID CRC" indicates a cyclic redundancy check noncompare in an ID field:
  622.  
  623.       - When the searching for an ID field and orientation can not be achieved
  624.  
  625.       - After initial orientation, when a subsequent ID CRC is detected.
  626.  
  627. The next diskette operation or system reset operation resets this bit.
  628.  
  629. 2
  630. "Data  CRC" indicates a cyclic redundancy check noncompare in the  data field
  631. after initial record orientation. The next diskette operation or system reset
  632. operation resets this bit.
  633.  
  634. 3
  635. "Cylinder mismatch" indicates a mismatch between the cylinder address portion
  636. of  the ID field and the control field during an ID search. This bit is reset
  637. prior to diskette I/O instruction execution or by a system reset operation.
  638.  
  639. 4
  640. "Head  mismatch" indicates a mismatch between the head address portion of the
  641. ID field and the control field during an ID search. This bit is reset prior to
  642. the next diskette operation or by the next system reset operation.
  643.  
  644. 5
  645. "Record  mismatch" indicates that no match between the record address portion
  646. of  any ID field and the control field occurred during an ID search. This bit
  647. is  reset  prior to the next diskette operation or by the  next  system reset
  648. operation.
  649.  
  650. 6
  651. "Length  mismatch" indicates a mismatch between the record length  portion
  652. of
  653. the  ID  field and the control field during an ID search. This  bit  is
  654. reset
  655. prior to the next diskette operation or by the next system reset operation.
  656.  
  657. 7
  658. This bit is reserved.
  659.  
  660.  
  661. Status byte 1
  662. -------------
  663.  
  664. 0
  665. "No  operation" indicates that a diskette I/O instruction cannot  be
  666. executed
  667. because  of  an outstanding not-ready status. This bit is reset  by  the
  668. next
  669. diskette I/O instruction or by a system reset operation.
  670.  
  671. 1
  672. "Invalid control record" indicates that the leftmost byte of a control
  673. record
  674. data field contains other than an F or D control graphic. This bit is reset
  675. by
  676. a diskette I/O instruction or by system reset.
  677.  
  678. 2
  679. "Control  error" indicates that a low write current existed during a
  680. diskette
  681. write operation or write or erase gate selection was made during any
  682. diskette
  683. I/O  operation  except  write.  This bit is reset  prior  to  a  diskette
  684. I/O
  685. operation or by a system reset operation.
  686.  
  687. 3
  688. "Control address mark record found" indicates that a control address mark
  689. was
  690. found. This record was skipped and the next one was processed in its place
  691. if
  692. the operation was read-data and the leftmost byte of the data field
  693. contained
  694. hex  D  or  F. This condition is not tested by a test  instruction.  The
  695. next
  696. diskette  read,  write,  or seek operation  resets  the
  697. control-address-mark-
  698. record-found bit.
  699.  
  700. 4
  701. "Cylinder  address invalid" indicates that the logical cylinder number in
  702. the
  703. control field exceeds 76. This bit is reset prior to a start diskette
  704. command
  705. or by a system reset operation.
  706.  
  707. 5
  708. "Write error" indicates that either a write overun (status byte 2, bit 6) or
  709. a
  710. write parity check (byte 2, bit 7) was detected during a write operation.
  711. This
  712. bit  is  reset  by  the next diskette I/O instruction or  by  a  system
  713. reset
  714. operation.
  715.  
  716. 6
  717. This bit is used by the system.
  718.  
  719. 7
  720. This bit is used by the system.
  721.  
  722.  
  723. Status byte 2
  724. -------------
  725.  
  726. 0
  727. "Diskette  fast" indicates that the diskette rotates faster than  the
  728. maximum
  729. specified  rate  of 369 RPM, or 162.50 ms per revolution. This  bit  is
  730. reset
  731. prior to the next diskette operation or by a system reset operation.
  732.  
  733. 1
  734. "Not ready" indicates that:
  735.         The diskette is not inserted, or
  736.         The door is not closed, or
  737.         The diskette is inserted backwards, or
  738.         The diskette unit is malfunctioning.
  739.  
  740. "Ready"  is  conditioned by a recalibrate operation if the diskette is  up
  741. to
  742. proper speed. This is the only way this bit can be reset.
  743.  
  744. 2
  745. This bit is unassigned.
  746.  
  747. 3
  748. "No  orient"  indicates that a record specified by the record address  in
  749. the
  750. control field of a data operation could not be found. This bit is reset
  751. prior
  752. to the next diskette operation or by a system reset operation.
  753.  
  754. 4
  755. "Read  overrun"  indicates  that  the  minimum  data  transfer  rate  was
  756. not
  757. maintained during a data transfer operation from the diskette to main
  758. storage.
  759. This  bit is reset prior to the next diskette operation or by a  system
  760. reset
  761. operation.
  762.  
  763. 5
  764. This bit is unassigned.
  765.  
  766. 6
  767. "Write  overrun"  is similar to a read overrun except that  the  minimum
  768. data
  769. transfer rate is not maintained during data transfer from main storage to
  770. the
  771. diskette.  The  next diskette read, write, or seek operation or  system
  772. reset
  773. operation resets this bit.
  774.  
  775. Note:  This status bit can be sensed by the program for a  write-ID
  776. operation
  777. only.  Write-error status (byte 1, bit 5) is set simultaneously;  the
  778. program
  779. can sense this bit.
  780.  
  781. 7
  782. "Write parity check" indicates that a mismatch between data-bus-out parity
  783. and
  784. system  generated  serial-write-data  parity  was  detected  during  a
  785. write
  786. operation.  The next diskette read, write, or seek operation or  system
  787. reset
  788. operation resets this bit.
  789.  
  790. Note:  This status bit can be sensed by the program for a  write-ID
  791. operation
  792. only.  Write-error status (byte 1, bit 5) is set simultaneously;  the
  793. program
  794. can sense this bit.
  795.  
  796.  
  797. Status byte 3
  798. -------------
  799.  
  800. The status bits in this byte cannot be sensed by your program. Bits 0 and
  801. 4-7
  802. may  be on if a 1-track seek preceded the I/O operation bits 1, 2, and 3
  803. will
  804. be off. (ROCHE>? if a ... preceded the I/O operation. Then, bits... ?)
  805.  
  806. 0
  807. The head is loaded.
  808.  
  809. 1
  810. The low write current to diskette is set.
  811.  
  812. 2
  813. The write gate to diskette is on.
  814.  
  815. 3
  816. The erase gate to diskette is on.
  817.  
  818. 4
  819. Seek to track 3 or 0 is on.
  820.  
  821. 5
  822. Seek to track 0 or 1 is on.
  823.  
  824. 6
  825. Seek to track 1 or 2 is on.
  826.  
  827. 7
  828. Seek to track 2 or 3 is on.
  829.  
  830.  
  831. IMPL (Initial Microprogram Load) and IPL (Initial Program Load)
  832. ---------------------------------------------------------------
  833.  
  834. IMPL  and IPL are selected by toggle switches located on the CE panel and
  835. are
  836. initiated by pressing the LOAD key located on the operator's panel.
  837.  
  838. A diskette IMPL initiates the transfer of the 4096-byte IMPL record located
  839. on
  840. track  00, record 01 into storage. This 4096-byte record is a  special
  841. record
  842. used by the system; it is never used by the programmer.
  843.  
  844. The  IPL  from the diskette is not the normal mode and is used  primarily
  845. for
  846. installing  a  new supervisor. IPL from diskette is initiated  by  the
  847. system
  848. immediately following a successful IMPL if the DEVICE SELECT switch is set
  849. to
  850. select IPL from the diskette.
  851.  
  852.  
  853. Suggested diskette error recovery procedures
  854. --------------------------------------------
  855.  
  856. The recovery procedures presented in Figure 8-3 can be used to restore
  857. system
  858. operation.  The type of action necessary is determined by performing a
  859. sense-
  860. diskette  operation, then testing to determine which diskette status bits
  861. are
  862. on.
  863.  
  864. Figure  8-3.  Diskette  operation ending  conditions,  status,  and
  865. suggested
  866. restart
  867.  
  868. Notes:
  869. a = No-op is set by all operations except recalibrate.
  870. b = This condition is not tested for error recovery procedure.
  871.  
  872.                       Suggested action  <-------------------------------+
  873.                                                                         |
  874.      Condition set by:                                                  |
  875. Seek                         Q-Byte D0  <--------------------------+    |
  876. Read Data                    Q-Byte D1  <------------------------+ |    |
  877. Read ID                      Q-Byte D2  <----------------------+ | |    |
  878. Read Data and Control Data   Q-Byte D4  <--------------------+ | | |    |
  879. Write Data    (Write  Cycle) Q-Byte D5  <------------------+ | | | |    |
  880. Write Data    (Verify Cycle) Q-Byte D5  <----------------+ | | | | |    |
  881. Write Control (Write  Cycle) Q-Byte D6  <--------------+ | | | | | |    |
  882. Write Control (Verify Cycle) Q-Byte D6  <------------+ | | | | | | |    |
  883. Write ID      (Write  Cycle) Q-Byte D7  <----------+ | | | | | | | |    |
  884. Write ID      (Verify Cycle) Q-Byte D7  <--------+ | | | | | | | | |    |
  885.                                                  | | | | | | | | | |    |
  886.                                                  | | | | | | | | | |    |
  887. Status Byte 0                                    | | | | | | | | | |    |
  888. -------------                                    | | | | | | | | | |    |
  889.                                                  | | | | | | | | | |    |
  890.    Bit  Name                                     | | | | | | | | | |    |
  891.    ---  ----                                     V V V V V V V V V V    V
  892.     0   Missing data address mark               |X|X| |X| |X| |X| |X|   3
  893.                                                 | | | | | | | | | | |
  894.     1   ID CRC                                  | |X|X|X|X|X|X|X| |X|   3
  895.                                                 | | | | | | | | | | |
  896.     2   Data CRC                                | |X| |X| |X| |X| |X|   3
  897.                                                 | | | | | | | | | | |
  898.     3   Cylinder mismatch                       | |X| |X|X|X|X|X| |X|   3
  899.                                                 | | | | | | | | | | |
  900.     4   Head mismatch                           | |X| |X|X|X|X|X| |X|   3
  901.                                                 | | | | | | | | | | |
  902.     5   Record mismatch                         | |X| |X|X|X|X|X| |X|   3
  903.                                                 | | | | | | | | | | |
  904.     6   Length mismatch                         | |X| |X|X|X|X|X| |X|   3
  905.                                                 | | | | | | | | | | |
  906.     7   Not used                                | | | | | | | | | | |   3
  907.                                                 | | | | | | | | | | |
  908.                                                 | | | | | | | | | | |
  909. Status Byte 1                                   | | | | | | | | | | |
  910. -------------                                   | | | | | | | | | | |
  911.                                                 | | | | | | | | | | |
  912.    Bit  Name                                    | | | | | | | | | | |
  913.    ---  ----                                    | | | | | | | | | | |
  914.     0   No op                                   |a|X| |X| |X| |X| |X|   3
  915.                                                 | | | | | | | | | | |
  916.     1   Invalid control record                  | |X| |X| | | | | | |   4
  917.                                                 | | | | | | | | | | |
  918.     2   Control error                           |X|X|X|X|X|X|X|X|X|X|   3
  919.                                                 | | | | | | | | | | |
  920.     3   Control address mark record found       |b|b|b|b|b|b|b|b|b|b|
  921.                                                 | | | | | | | | | | |
  922.     4   Cylinder address invalid                |X|X| |X|X|X|X|X| |X|   2
  923.                                                 | | | | | | | | | | |
  924.     5   Write error                             | | | | |b|b|b|b|b|b|
  925.                                                 | | | | | | | | | | |
  926.     6   Not used                                | | | | | | | | | | |
  927.                                                 | | | | | | | | | | |
  928.     7   Not used                                | | | | | | | | | | |
  929.                                                 | | | | | | | | | | |
  930.                                                 | | | | | | | | | | |
  931. Status Byte 2                                   | | | | | | | | | | |
  932. -------------                                   | | | | | | | | | | |
  933.                                                 | | | | | | | | | | |
  934.    Bit  Name                                    | | | | | | | | | | |
  935.    ---  ----                                    | | | | | | | | | | |
  936.     0   Diskette fast                           |X|X|X|X|X|X|X|X|X|X|   3
  937.                                                 | | | | | | | | | | |
  938.     1   Not ready                               |X|X|X|X|X|X|X|X|X|X|   1
  939.                                                 | | | | | | | | | | |
  940.     2   Not used                                | | | | | | | | | | |
  941.                                                 | | | | | | | | | | |
  942.     3   No orient                               | |X|X|X| |X| |X| |X|   3
  943.                                                 | | | | | | | | | | |
  944.     4   Read overrun                            | |X|X|X| |X| |X| |X|   3
  945.                                                 | | | | | | | | | | |
  946.     5   Not used                                | | | | | | | | | | |
  947.                                                 | | | | | | | | | | |
  948.     6   Write overrun                           | | | | |X| |X| |X| |   3
  949.                                                 | | | | | | | | | | |
  950.     7   Write parity check                      | | | | |X| |X| |X| |   3
  951.  
  952.  
  953. Suggested action
  954. ----------------
  955.  
  956. Number  Description
  957. ------  -----------
  958. 1       1. Recalibrate.
  959.         2. Read volume label.
  960.         3. Check volume 1 standard and volume identification for validity.
  961.           (If not valid issue message to insert correct diskette.)
  962.         4. Repeat until valid diskette is inserted or until job is canceled.
  963.         5. Post possible wrong-diskette-inserted return code.
  964.         6. Return.
  965.  
  966. 2       1. Post end-of-volume return code.
  967.         2. Return.
  968.  
  969. 3       1. Retry three times or until successful.
  970.              a. If  not  successful, seek forward and  backward  one
  971. cylinder
  972.                 three times or until successful.
  973.              b. If step 1a is not successful, and if the system is executing
  974. a
  975.                 read data operation, evoke an automatic sector rebuild. If
  976. the
  977.                 system  is  not  executing a read  data  operation,  post
  978. the
  979.                 permanent-error return.
  980.         2. Log the diskette error.
  981.         3. Return.
  982.  
  983. 4       1. Post invalid-control-record-read return code.
  984.         2. Return.
  985.  
  986.  
  987. Initialization procedures
  988. -------------------------
  989.  
  990. Diskette  initialization  procedures described below guarantee  a
  991. serviceable
  992. diskette. Basic initialization objectives are that:
  993.  
  994.       - Track 00 must be free of defects.
  995.  
  996.       - Diskettes  are  initialized in accordance with the  basic
  997. interchange
  998.         record  format defined in this chapter under "Diskette control
  999. fields
  1000.         and data fields".
  1001.  
  1002.       - Defective tracks are flagged defective and the ERMAP is updated.
  1003.  
  1004.  
  1005. To initialize the diskette:
  1006.  
  1007.   1.    Reinitialize track 00.
  1008.      a. Write  ID/verify  with  128  bytes of hex E5 in  the  data  field.
  1009. If
  1010.         unsuccessful, retry a maximum of two times, and if still
  1011. unsuccessful,
  1012.         go to step 3.
  1013.      b. Write  data/verify  with  128 bytes of hex 40 in the  data  field.
  1014. If
  1015.         unsuccessful, retry a maximum of two times, and if still
  1016. unsuccessful,
  1017.         go to step 3.
  1018.  
  1019.   2.    Continue to sequentially reinitialize the remainder of the diskette
  1020. by
  1021.         repeating step 1. (Be sure to reinitialize sectors of the
  1022. appropriate
  1023.         length -- 128 bytes each or 512 bytes each.)
  1024.  
  1025.   3.    If track 00 cannot be successfully initialized, discard the
  1026. diskette.
  1027.         If track 00 is successfully initialized and some other track is
  1028. found
  1029.         defective,  use  the  surface defect procedures,  flag  the
  1030. defective
  1031.         track, and update the ERMAP.
  1032.  
  1033.  
  1034. Surface defect procedures
  1035. -------------------------
  1036.  
  1037. The  track  must be flagged as defective and the ERMAP label must  be
  1038. updated
  1039. during  a reformatting operation if less than two tracks have been
  1040. previously
  1041. flagged.
  1042.  
  1043. The diskette must be discarded if track 00 is defective, or if two tracks
  1044. have
  1045. been flagged as defective and an additional track is found defective.
  1046.  
  1047.  
  1048. EOF
  1049.  
  1050.  
  1051.  
  1052.